<h1>Assistenze urgenti</h1>
<%= link_to 'Non complete', { :action => "todo", :id => "0" } %> | 
<%= link_to 'Complete parzialmente', { :action => "todo", :id => "1" } %> | 
<%= link_to 'Tutte', assistances_path %>
<br /><br />
<table>
  <tr>
    <th>Cliente</th>
    <th>Stato</th>
		<th>Scadenza</th>
		<th>Resoconto</th>
    <th colspan="3">Comandi</th>
  </tr>
<% for assistance in @assistances %>
	<tr class="<%= cycle("even", "odd") %>">
    <td><%= assistance.client.name_or_society %></td>
    <td><%= image_tag(assistance.stato_to_image) %></td>
		<td><%= assistance.expiration_to_s %></td>
		<td><%= assistance.confirm_to_s %></td>
    <td><%= link_to image_tag("info.png", :alt => "show"), { :action => "show", :id => assistance } %></td>
    <td><%= link_to image_tag("edit.png", :alt => "edit"), { :action => "edit", :id => assistance } %></td>
    <td><%= link_to image_tag("delete.png", :alt => "delete"), { :action => "destroy", :id => assistance }, :confirm => 'Sei sicuro?', :method => :delete %></td>
  </tr>
<% end %>
</table>
<%= will_paginate @assistances, option = {:inner_window => 2, :outer_window => 3} %>
